<script type="text/javascript" src="/static/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="/static/lib/layer/2.4/layer.js"></script>
 
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/validate-methods.js"></script>
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/messages_zh.js"></script>
<script type="text/javascript" src="/static/js/H-ui.js"></script>
<script type="text/javascript" src="/static/js/H-ui.admin.page.js"></script> 
<script type="text/javascript" src="/static/js/myfunc.js"></script>
<script type="text/javascript">
function logout(){
    layer.confirm('纳尼,要退出？', function(index){
            $.ajax({
                type:"POST",
                cache:false,
                url:"{:url('login/logout')}",
                dataType:"json",
                success:function(data){
                    if(data.status==0){
                        // alert(data.msg);
                        window.location.href="{:url('login/index')}";
                        return false; 
                    }        
                }
            });
        });
}
//当前时间
// add a zero in front of numbers<10
function addZero(num){
    return num<10?"0"+num:num;
}

function time(){
    var today=new Date()
    var y = today.getFullYear();
    var mon = today.getMonth()+1;
    var d = today.getDate();
    var h=today.getHours()
    var m=today.getMinutes()
    var s=today.getSeconds()

    $(".li_time span").html(y+'-'+addZero(mon)+'-'+addZero(d)+"&nbsp;&nbsp;&nbsp;"+addZero(h)+":"+addZero(m)+":"+addZero(s));
    setTimeout('time()',1000);
}
time();
</script>
